package com.estock.common.model.task;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.estock.common.model.security.BaseEntity;

@Entity
@Table(name="TaskRun")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class TaskRun extends BaseEntity {

	private static final long serialVersionUID = 8340311605410730937L;
	
	private Long taskId;
	
	private int status;
	
	private Date startedDTime;
	
	private Date finishedDTime;
	
	public TaskRun(){}
	
	public TaskRun(Long taskId) {
		this.taskId = taskId;
	}
	
	public Long getTaskId() {
		return taskId;
	}

	public void setTaskId(Long taskId) {
		this.taskId = taskId;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Date getStartedDTime() {
		return startedDTime;
	}

	public void setStartedDTime(Date startedDTime) {
		this.startedDTime = startedDTime;
	}

	public Date getFinishedDTime() {
		return finishedDTime;
	}

	public void setFinishedDTime(Date finishedDTime) {
		this.finishedDTime = finishedDTime;
	}

}
